# -*- coding: utf-8 -*-
# @Time    : 2021/8/29 22:16
# @Author  : BrandonGT
# @FileName: 04-PyQt5_QWidget.py

import sys
from PyQt5.QtWidgets import *

if __name__ == '__main__':
    app = QApplication(sys.argv)

    window = QWidget()

    frame = [2560, 1440]

    window.resize(2000, 500)
    window.move(int((frame[0]-window.width())/2), int((frame[1]-window.height())/2))

    # print(QWidget.__bases__)  # 直接继承
    # print(QWidget.mro())  # 直接和间接继承

    window.show()


    # def create_new():
    #     window2 = QWidget()
    #     window2.resize(100, 100)
    #     window2.setWindowTitle("New Window")
    #
    #     window2.show()
    #
    # window = QWidget()
    # window.resize(500, 500)
    # window.setWindowTitle("QWidgets Test")
    #
    # btn = QPushButton(window)
    # btn.resize(200, 50)
    # btn.move(150, int((500-50)/2))
    # btn.setText("Create A New Window")
    # btn.clicked.connect(create_new)
    #
    # window.show()
    #
    # window3 = QWidget()
    # window3.resize(100, 100)
    # window3.setWindowTitle("window 3")
    #
    # window3.show()

    sys.exit(app.exec_())